﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MethodWorx.CMS.Content;
using System.ComponentModel.DataAnnotations;
using MethodWorx.CMS.Services;

namespace MethodWorx.CMS.Requests
{
    public abstract class ContentTemplateBasicDetailsRequest : IRequest
    {
        protected ContentTemplate contentTemplate;
        protected ContentTemplateService service;

        public ContentTemplateBasicDetailsRequest(ContentTemplateService service)
        {
            this.service = service;
        }

        [Required(ErrorMessage = "Please enter a content template name")]
        public string Name { get { return this.contentTemplate.Name; } set { this.contentTemplate.Name = value; } }
        public string Description { get { return this.contentTemplate.Description; } set { this.contentTemplate.Description = value; } }

        protected internal ContentTemplate ContentTemplate
        {
            get { return this.contentTemplate; }
        }

        public abstract void Complete();
    }
}
